<%--
  Created by IntelliJ IDEA.
  User: mrsun
  Date: 2020/12/12
  Time: 17:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script>
        function a1() {
            $.post({
                url: "${pageContext.request.contextPath}/a3",
                data: {"name": $("name").val()},
                success: function (data) {
                    console.log(data);
                }
            })
        }
        function a2() {
            $.post({
                url: "${pageContext.request.contextPath}/a3",
                data: {"pwd": $("pwd").val()},
                success: function (data) {
                    console.log(data);
                }
            })
        }
    </script>
</head>
<body>

<p>
    用户名: <input type="text" id="name" onblur="a1()">
    <span id="userInfo"></span>
</p>
<p>
    密  码: <input type="password" id="pwd" onblur="a2()">
    <span id="pwdInfo"></span>
</p>

</body>
</html>
